package com.syc.io;

import java.io.InputStream;

/**
 * io操作类
 *
 * @author Shen Yu Chen
 * @create 2020-04-23
 **/
public class Resources {

    /**
     * 根据传入配置文件路径,将指定配置文件读取成字节输入流加载进内存
     * @param path 路径
     * @return java.io.InputStream 输入流
     * @author Shen Yu Chen
     * @date 2020/4/23
     */
    public static InputStream getResourceAsSteam(String path){
        InputStream resourceAsStream = Resources.class.getClassLoader().getResourceAsStream(path);
        return resourceAsStream;
    }
}
